
import 'package:center_beijing/common/http_util.dart';

//获取工厂列表
getFactories() async {
  var responseJson = await HttpUtil().post("portal/irest/base/loginHandler/getAccessableProjectsAndSections",{});
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


//获取当前工厂的仓库和区域列表
getAllWarehouse(projectId) async {
  var responseJson = await HttpUtil().get("rheaservice/api/warehouse/listWarehouseAndStorage/"+projectId);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

//查询全部运输单
getAllOrders(params) async {
  var responseJson = await HttpUtil().get("rheaservice/api/transport/getTransportForm",params:params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

//根据运输单id查询可退货构件列表
getReturnComp(params) async {
  var responseJson = await HttpUtil().get("rheaservice/api/compReturn/pagination",params:params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

//发起退货
addReturnComp(params) async {
  var responseJson = await HttpUtil().post("rheaservice/api/compReturn",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}